# WidgetDef

ModelName: SRH-2D
WidgetName:
Sediment Size Class Cutoff (note: the size class is the table number minus 1 for the threshold particle size)_32


# QueryInst

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8533) END FROM WidgetInst WHERE WidgetInstId = 8533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 8533) END FROM WidgetInst WHERE WidgetInstId = 8533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8543) END FROM WidgetInst WHERE WidgetInstId = 8543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8544) END FROM WidgetInst WHERE WidgetInstId = 8544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8545) END FROM WidgetInst WHERE WidgetInstId = 8545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8546) END FROM WidgetInst WHERE WidgetInstId = 8546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8547) END FROM WidgetInst WHERE WidgetInstId = 8547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 8543) END FROM WidgetInst WHERE WidgetInstId = 8543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 8544) END FROM WidgetInst WHERE WidgetInstId = 8544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 8545) END FROM WidgetInst WHERE WidgetInstId = 8545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 8546) END FROM WidgetInst WHERE WidgetInstId = 8546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Depth Varied' AND WidgetInstId = 8547) END FROM WidgetInst WHERE WidgetInstId = 8547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 8572) END FROM WidgetInst WHERE WidgetInstId = 8572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8572) END FROM WidgetInst WHERE WidgetInstId = 8572) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 8585) END FROM WidgetInst WHERE WidgetInstId = 8585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 8587) END FROM WidgetInst WHERE WidgetInstId = 8587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 8585) END FROM WidgetInst WHERE WidgetInstId = 8585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 8587) END FROM WidgetInst WHERE WidgetInstId = 8587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8599;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8585) END FROM WidgetInst WHERE WidgetInstId = 8585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8603;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8587) END FROM WidgetInst WHERE WidgetInstId = 8587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8585) END FROM WidgetInst WHERE WidgetInstId = 8585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8587) END FROM WidgetInst WHERE WidgetInstId = 8587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8585) END FROM WidgetInst WHERE WidgetInstId = 8585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 8587) END FROM WidgetInst WHERE WidgetInstId = 8587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 8585) END FROM WidgetInst WHERE WidgetInstId = 8585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 8587) END FROM WidgetInst WHERE WidgetInstId = 8587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8623;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 8585) END FROM WidgetInst WHERE WidgetInstId = 8585) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 8587) END FROM WidgetInst WHERE WidgetInstId = 8587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8631;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8643;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 8580) END FROM WidgetInst WHERE WidgetInstId = 8580) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 8664) END FROM WidgetInst WHERE WidgetInstId = 8664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 8674) END FROM WidgetInst WHERE WidgetInstId = 8674) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 8677) END FROM WidgetInst WHERE WidgetInstId = 8677) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 8682) END FROM WidgetInst WHERE WidgetInstId = 8682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 8682) END FROM WidgetInst WHERE WidgetInstId = 8682) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 8674) END FROM WidgetInst WHERE WidgetInstId = 8674) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8700;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 8714;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 8714;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 8714;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 8714;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 8714;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 8714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 8717) END FROM WidgetInst WHERE WidgetInstId = 8717) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8718;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8726;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8734) END FROM WidgetInst WHERE WidgetInstId = 8734) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8734) END FROM WidgetInst WHERE WidgetInstId = 8734) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8738;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8741;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8743) END FROM WidgetInst WHERE WidgetInstId = 8743) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8744;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8743) END FROM WidgetInst WHERE WidgetInstId = 8743) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8747;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8743) END FROM WidgetInst WHERE WidgetInstId = 8743) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8755) END FROM WidgetInst WHERE WidgetInstId = 8755)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8757) END FROM WidgetInst WHERE WidgetInstId = 8757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8757) END FROM WidgetInst WHERE WidgetInstId = 8757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8757) END FROM WidgetInst WHERE WidgetInstId = 8757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8757) END FROM WidgetInst WHERE WidgetInstId = 8757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8755) END FROM WidgetInst WHERE WidgetInstId = 8755)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8757) END FROM WidgetInst WHERE WidgetInstId = 8757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8757) END FROM WidgetInst WHERE WidgetInstId = 8757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8773) END FROM WidgetInst WHERE WidgetInstId = 8773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8774;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8757) END FROM WidgetInst WHERE WidgetInstId = 8757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8757) END FROM WidgetInst WHERE WidgetInstId = 8757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 8773) END FROM WidgetInst WHERE WidgetInstId = 8773) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 8757) END FROM WidgetInst WHERE WidgetInstId = 8757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 8757) END FROM WidgetInst WHERE WidgetInstId = 8757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8781;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8782;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8818) END FROM WidgetInst WHERE WidgetInstId = 8818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8818) END FROM WidgetInst WHERE WidgetInstId = 8818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8818) END FROM WidgetInst WHERE WidgetInstId = 8818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8834) END FROM WidgetInst WHERE WidgetInstId = 8834) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8834) END FROM WidgetInst WHERE WidgetInstId = 8834) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8834) END FROM WidgetInst WHERE WidgetInstId = 8834) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8854) END FROM WidgetInst WHERE WidgetInstId = 8854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8854) END FROM WidgetInst WHERE WidgetInstId = 8854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8854) END FROM WidgetInst WHERE WidgetInstId = 8854) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8874) END FROM WidgetInst WHERE WidgetInstId = 8874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8874) END FROM WidgetInst WHERE WidgetInstId = 8874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8874) END FROM WidgetInst WHERE WidgetInstId = 8874) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8880) END FROM WidgetInst WHERE WidgetInstId = 8880) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8874) END FROM WidgetInst WHERE WidgetInstId = 8874)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8880) END FROM WidgetInst WHERE WidgetInstId = 8880) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8874) END FROM WidgetInst WHERE WidgetInstId = 8874)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8883;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 8880) END FROM WidgetInst WHERE WidgetInstId = 8880) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 8874) END FROM WidgetInst WHERE WidgetInstId = 8874)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8885;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8887;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8889) END FROM WidgetInst WHERE WidgetInstId = 8889) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8889) END FROM WidgetInst WHERE WidgetInstId = 8889) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8889) END FROM WidgetInst WHERE WidgetInstId = 8889) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8896;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8889) END FROM WidgetInst WHERE WidgetInstId = 8889) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8907;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8910;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 8913) END FROM WidgetInst WHERE WidgetInstId = 8913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8914;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 8913) END FROM WidgetInst WHERE WidgetInstId = 8913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8913) END FROM WidgetInst WHERE WidgetInstId = 8913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 8913) END FROM WidgetInst WHERE WidgetInstId = 8913) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8931;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 8935) END FROM WidgetInst WHERE WidgetInstId = 8935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8936;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8935) END FROM WidgetInst WHERE WidgetInstId = 8935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8935) END FROM WidgetInst WHERE WidgetInstId = 8935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8940;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8935) END FROM WidgetInst WHERE WidgetInstId = 8935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8935) END FROM WidgetInst WHERE WidgetInstId = 8935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8944;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 8935) END FROM WidgetInst WHERE WidgetInstId = 8935) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8572) END FROM WidgetInst WHERE WidgetInstId = 8572)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 8950) END FROM WidgetInst WHERE WidgetInstId = 8950) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8951;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 8961;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 8961;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 8961;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 8961;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 8961;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 8961;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 8962;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 8962;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 8962;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 8962;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 8962;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 8962;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 8963;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 8963;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 8963;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 8963;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 8963;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 8963;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 8964;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 8964;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 8964;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 8964;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 8964;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 8964;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8965;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8967;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8968;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 8973) END FROM WidgetInst WHERE WidgetInstId = 8973) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 8974) END FROM WidgetInst WHERE WidgetInstId = 8974) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 8975) END FROM WidgetInst WHERE WidgetInstId = 8975) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8979;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 8976) END FROM WidgetInst WHERE WidgetInstId = 8976) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8980;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8985;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8987;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 8988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9009;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9010;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9023;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9041) END FROM WidgetInst WHERE WidgetInstId = 9041) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9042) END FROM WidgetInst WHERE WidgetInstId = 9042) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9043) END FROM WidgetInst WHERE WidgetInstId = 9043) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9044) END FROM WidgetInst WHERE WidgetInstId = 9044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9048;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9041) END FROM WidgetInst WHERE WidgetInstId = 9041) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9042) END FROM WidgetInst WHERE WidgetInstId = 9042) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9043) END FROM WidgetInst WHERE WidgetInstId = 9043) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9044) END FROM WidgetInst WHERE WidgetInstId = 9044) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9072;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9077) END FROM WidgetInst WHERE WidgetInstId = 9077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9081;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9078) END FROM WidgetInst WHERE WidgetInstId = 9078) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9079) END FROM WidgetInst WHERE WidgetInstId = 9079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9080) END FROM WidgetInst WHERE WidgetInstId = 9080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9077) END FROM WidgetInst WHERE WidgetInstId = 9077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9093;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9078) END FROM WidgetInst WHERE WidgetInstId = 9078) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9094;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9079) END FROM WidgetInst WHERE WidgetInstId = 9079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9095;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9080) END FROM WidgetInst WHERE WidgetInstId = 9080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9096;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9077) END FROM WidgetInst WHERE WidgetInstId = 9077) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9105;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9078) END FROM WidgetInst WHERE WidgetInstId = 9078) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9106;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9079) END FROM WidgetInst WHERE WidgetInstId = 9079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9080) END FROM WidgetInst WHERE WidgetInstId = 9080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9108;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9120;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9125) END FROM WidgetInst WHERE WidgetInstId = 9125)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9137;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9126) END FROM WidgetInst WHERE WidgetInstId = 9126)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9127) END FROM WidgetInst WHERE WidgetInstId = 9127)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9128) END FROM WidgetInst WHERE WidgetInstId = 9128)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9133) END FROM WidgetInst WHERE WidgetInstId = 9133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9134) END FROM WidgetInst WHERE WidgetInstId = 9134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9135) END FROM WidgetInst WHERE WidgetInstId = 9135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9136) END FROM WidgetInst WHERE WidgetInstId = 9136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9133) END FROM WidgetInst WHERE WidgetInstId = 9133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9134) END FROM WidgetInst WHERE WidgetInstId = 9134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9154;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9135) END FROM WidgetInst WHERE WidgetInstId = 9135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9136) END FROM WidgetInst WHERE WidgetInstId = 9136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9133) END FROM WidgetInst WHERE WidgetInstId = 9133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9134) END FROM WidgetInst WHERE WidgetInstId = 9134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9135) END FROM WidgetInst WHERE WidgetInstId = 9135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9136) END FROM WidgetInst WHERE WidgetInstId = 9136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9133) END FROM WidgetInst WHERE WidgetInstId = 9133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9169;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9134) END FROM WidgetInst WHERE WidgetInstId = 9134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9135) END FROM WidgetInst WHERE WidgetInstId = 9135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9136) END FROM WidgetInst WHERE WidgetInstId = 9136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9172;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9125) END FROM WidgetInst WHERE WidgetInstId = 9125)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9126) END FROM WidgetInst WHERE WidgetInstId = 9126)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9127) END FROM WidgetInst WHERE WidgetInstId = 9127)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9128) END FROM WidgetInst WHERE WidgetInstId = 9128)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9133) END FROM WidgetInst WHERE WidgetInstId = 9133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9134) END FROM WidgetInst WHERE WidgetInstId = 9134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9135) END FROM WidgetInst WHERE WidgetInstId = 9135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9136) END FROM WidgetInst WHERE WidgetInstId = 9136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9188;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9133) END FROM WidgetInst WHERE WidgetInstId = 9133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9189;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9134) END FROM WidgetInst WHERE WidgetInstId = 9134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9190;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9135) END FROM WidgetInst WHERE WidgetInstId = 9135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9191;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9136) END FROM WidgetInst WHERE WidgetInstId = 9136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9197) END FROM WidgetInst WHERE WidgetInstId = 9197) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9198) END FROM WidgetInst WHERE WidgetInstId = 9198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9199) END FROM WidgetInst WHERE WidgetInstId = 9199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9200) END FROM WidgetInst WHERE WidgetInstId = 9200) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9133) END FROM WidgetInst WHERE WidgetInstId = 9133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9209;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9134) END FROM WidgetInst WHERE WidgetInstId = 9134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9210;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9135) END FROM WidgetInst WHERE WidgetInstId = 9135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9211;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9136) END FROM WidgetInst WHERE WidgetInstId = 9136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9212;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9133) END FROM WidgetInst WHERE WidgetInstId = 9133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9134) END FROM WidgetInst WHERE WidgetInstId = 9134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9135) END FROM WidgetInst WHERE WidgetInstId = 9135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9136) END FROM WidgetInst WHERE WidgetInstId = 9136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9197) END FROM WidgetInst WHERE WidgetInstId = 9197) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9198) END FROM WidgetInst WHERE WidgetInstId = 9198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9199) END FROM WidgetInst WHERE WidgetInstId = 9199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9200) END FROM WidgetInst WHERE WidgetInstId = 9200) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9220;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9133) END FROM WidgetInst WHERE WidgetInstId = 9133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9134) END FROM WidgetInst WHERE WidgetInstId = 9134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9226;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9135) END FROM WidgetInst WHERE WidgetInstId = 9135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9227;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9136) END FROM WidgetInst WHERE WidgetInstId = 9136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9228;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9133) END FROM WidgetInst WHERE WidgetInstId = 9133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9134) END FROM WidgetInst WHERE WidgetInstId = 9134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9230;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9135) END FROM WidgetInst WHERE WidgetInstId = 9135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9136) END FROM WidgetInst WHERE WidgetInstId = 9136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9232;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9234;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9246;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9377) END FROM WidgetInst WHERE WidgetInstId = 9377) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9378) END FROM WidgetInst WHERE WidgetInstId = 9378) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9379) END FROM WidgetInst WHERE WidgetInstId = 9379) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9380) END FROM WidgetInst WHERE WidgetInstId = 9380) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9377) END FROM WidgetInst WHERE WidgetInstId = 9377) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9389;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9378) END FROM WidgetInst WHERE WidgetInstId = 9378) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9379) END FROM WidgetInst WHERE WidgetInstId = 9379) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9380) END FROM WidgetInst WHERE WidgetInstId = 9380) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9377) END FROM WidgetInst WHERE WidgetInstId = 9377) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9378) END FROM WidgetInst WHERE WidgetInstId = 9378) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9379) END FROM WidgetInst WHERE WidgetInstId = 9379) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9380) END FROM WidgetInst WHERE WidgetInstId = 9380) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9441) END FROM WidgetInst WHERE WidgetInstId = 9441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9442) END FROM WidgetInst WHERE WidgetInstId = 9442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9443) END FROM WidgetInst WHERE WidgetInstId = 9443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9444) END FROM WidgetInst WHERE WidgetInstId = 9444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9441) END FROM WidgetInst WHERE WidgetInstId = 9441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9442) END FROM WidgetInst WHERE WidgetInstId = 9442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9443) END FROM WidgetInst WHERE WidgetInstId = 9443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9444) END FROM WidgetInst WHERE WidgetInstId = 9444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9441) END FROM WidgetInst WHERE WidgetInstId = 9441) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9461;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9442) END FROM WidgetInst WHERE WidgetInstId = 9442) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9443) END FROM WidgetInst WHERE WidgetInstId = 9443) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9444) END FROM WidgetInst WHERE WidgetInstId = 9444) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9470;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9472;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9521) END FROM WidgetInst WHERE WidgetInstId = 9521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9522) END FROM WidgetInst WHERE WidgetInstId = 9522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9523) END FROM WidgetInst WHERE WidgetInstId = 9523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9524) END FROM WidgetInst WHERE WidgetInstId = 9524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9521) END FROM WidgetInst WHERE WidgetInstId = 9521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9522) END FROM WidgetInst WHERE WidgetInstId = 9522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9523) END FROM WidgetInst WHERE WidgetInstId = 9523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9524) END FROM WidgetInst WHERE WidgetInstId = 9524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9521) END FROM WidgetInst WHERE WidgetInstId = 9521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9522) END FROM WidgetInst WHERE WidgetInstId = 9522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9542;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9523) END FROM WidgetInst WHERE WidgetInstId = 9523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9543;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9524) END FROM WidgetInst WHERE WidgetInstId = 9524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9601) END FROM WidgetInst WHERE WidgetInstId = 9601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9602) END FROM WidgetInst WHERE WidgetInstId = 9602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9603) END FROM WidgetInst WHERE WidgetInstId = 9603) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9604) END FROM WidgetInst WHERE WidgetInstId = 9604) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9608;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9601) END FROM WidgetInst WHERE WidgetInstId = 9601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9602) END FROM WidgetInst WHERE WidgetInstId = 9602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9603) END FROM WidgetInst WHERE WidgetInstId = 9603) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9604) END FROM WidgetInst WHERE WidgetInstId = 9604) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9616;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9601) END FROM WidgetInst WHERE WidgetInstId = 9601) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9602) END FROM WidgetInst WHERE WidgetInstId = 9602) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9622;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9603) END FROM WidgetInst WHERE WidgetInstId = 9603) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9623;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9604) END FROM WidgetInst WHERE WidgetInstId = 9604) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9624;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9625) END FROM WidgetInst WHERE WidgetInstId = 9625) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9601) END FROM WidgetInst WHERE WidgetInstId = 9601)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9629;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9626) END FROM WidgetInst WHERE WidgetInstId = 9626) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9602) END FROM WidgetInst WHERE WidgetInstId = 9602)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9630;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9627) END FROM WidgetInst WHERE WidgetInstId = 9627) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9603) END FROM WidgetInst WHERE WidgetInstId = 9603)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9631;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9628) END FROM WidgetInst WHERE WidgetInstId = 9628) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9604) END FROM WidgetInst WHERE WidgetInstId = 9604)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9632;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9625) END FROM WidgetInst WHERE WidgetInstId = 9625) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9601) END FROM WidgetInst WHERE WidgetInstId = 9601)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9626) END FROM WidgetInst WHERE WidgetInstId = 9626) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9602) END FROM WidgetInst WHERE WidgetInstId = 9602)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9627) END FROM WidgetInst WHERE WidgetInstId = 9627) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9603) END FROM WidgetInst WHERE WidgetInstId = 9603)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9628) END FROM WidgetInst WHERE WidgetInstId = 9628) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9604) END FROM WidgetInst WHERE WidgetInstId = 9604)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9640;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9625) END FROM WidgetInst WHERE WidgetInstId = 9625) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9601) END FROM WidgetInst WHERE WidgetInstId = 9601)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9645;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9626) END FROM WidgetInst WHERE WidgetInstId = 9626) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9602) END FROM WidgetInst WHERE WidgetInstId = 9602)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9646;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9627) END FROM WidgetInst WHERE WidgetInstId = 9627) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9603) END FROM WidgetInst WHERE WidgetInstId = 9603)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 9628) END FROM WidgetInst WHERE WidgetInstId = 9628) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 9604) END FROM WidgetInst WHERE WidgetInstId = 9604)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9654;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9655;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9661) END FROM WidgetInst WHERE WidgetInstId = 9661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9662) END FROM WidgetInst WHERE WidgetInstId = 9662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9663) END FROM WidgetInst WHERE WidgetInstId = 9663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9664) END FROM WidgetInst WHERE WidgetInstId = 9664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9661) END FROM WidgetInst WHERE WidgetInstId = 9661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9662) END FROM WidgetInst WHERE WidgetInstId = 9662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9663) END FROM WidgetInst WHERE WidgetInstId = 9663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9664) END FROM WidgetInst WHERE WidgetInstId = 9664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9661) END FROM WidgetInst WHERE WidgetInstId = 9661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9662) END FROM WidgetInst WHERE WidgetInstId = 9662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9690;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9663) END FROM WidgetInst WHERE WidgetInstId = 9663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9664) END FROM WidgetInst WHERE WidgetInstId = 9664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9692;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9661) END FROM WidgetInst WHERE WidgetInstId = 9661) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9662) END FROM WidgetInst WHERE WidgetInstId = 9662) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9663) END FROM WidgetInst WHERE WidgetInstId = 9663) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9664) END FROM WidgetInst WHERE WidgetInstId = 9664) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9736;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9745;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9746;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9747;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9748;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9757) END FROM WidgetInst WHERE WidgetInstId = 9757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9758) END FROM WidgetInst WHERE WidgetInstId = 9758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9759) END FROM WidgetInst WHERE WidgetInstId = 9759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9760) END FROM WidgetInst WHERE WidgetInstId = 9760) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9757) END FROM WidgetInst WHERE WidgetInstId = 9757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9758) END FROM WidgetInst WHERE WidgetInstId = 9758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9774;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9759) END FROM WidgetInst WHERE WidgetInstId = 9759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9760) END FROM WidgetInst WHERE WidgetInstId = 9760) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9757) END FROM WidgetInst WHERE WidgetInstId = 9757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9758) END FROM WidgetInst WHERE WidgetInstId = 9758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9759) END FROM WidgetInst WHERE WidgetInstId = 9759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9760) END FROM WidgetInst WHERE WidgetInstId = 9760) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9757) END FROM WidgetInst WHERE WidgetInstId = 9757) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9758) END FROM WidgetInst WHERE WidgetInstId = 9758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9759) END FROM WidgetInst WHERE WidgetInstId = 9759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 9760) END FROM WidgetInst WHERE WidgetInstId = 9760) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 9845) END FROM WidgetInst WHERE WidgetInstId = 9845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 9846) END FROM WidgetInst WHERE WidgetInstId = 9846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 9847) END FROM WidgetInst WHERE WidgetInstId = 9847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 9848) END FROM WidgetInst WHERE WidgetInstId = 9848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9845) END FROM WidgetInst WHERE WidgetInstId = 9845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9846) END FROM WidgetInst WHERE WidgetInstId = 9846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9847) END FROM WidgetInst WHERE WidgetInstId = 9847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9848) END FROM WidgetInst WHERE WidgetInstId = 9848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9860;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9845) END FROM WidgetInst WHERE WidgetInstId = 9845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9846) END FROM WidgetInst WHERE WidgetInstId = 9846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9847) END FROM WidgetInst WHERE WidgetInstId = 9847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9848) END FROM WidgetInst WHERE WidgetInstId = 9848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9845) END FROM WidgetInst WHERE WidgetInstId = 9845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9846) END FROM WidgetInst WHERE WidgetInstId = 9846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9847) END FROM WidgetInst WHERE WidgetInstId = 9847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9848) END FROM WidgetInst WHERE WidgetInstId = 9848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9876;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9845) END FROM WidgetInst WHERE WidgetInstId = 9845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9846) END FROM WidgetInst WHERE WidgetInstId = 9846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9847) END FROM WidgetInst WHERE WidgetInstId = 9847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9883;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9848) END FROM WidgetInst WHERE WidgetInstId = 9848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9845) END FROM WidgetInst WHERE WidgetInstId = 9845) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9889;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9846) END FROM WidgetInst WHERE WidgetInstId = 9846) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9847) END FROM WidgetInst WHERE WidgetInstId = 9847) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 9848) END FROM WidgetInst WHERE WidgetInstId = 9848) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9892;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8961) END FROM WidgetInst WHERE WidgetInstId = 8961) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8572) END FROM WidgetInst WHERE WidgetInstId = 8572)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9897;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8962) END FROM WidgetInst WHERE WidgetInstId = 8962) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8572) END FROM WidgetInst WHERE WidgetInstId = 8572)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9898;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8963) END FROM WidgetInst WHERE WidgetInstId = 8963) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8572) END FROM WidgetInst WHERE WidgetInstId = 8572)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9899;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8964) END FROM WidgetInst WHERE WidgetInstId = 8964) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8572) END FROM WidgetInst WHERE WidgetInstId = 8572)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 9905) END FROM WidgetInst WHERE WidgetInstId = 9905) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9909;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 9906) END FROM WidgetInst WHERE WidgetInstId = 9906) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9910;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 9907) END FROM WidgetInst WHERE WidgetInstId = 9907) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9911;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 9908) END FROM WidgetInst WHERE WidgetInstId = 9908) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9912;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 9919;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 9919;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 9919;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 9919;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 9919;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 9919;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 9922) END FROM WidgetInst WHERE WidgetInstId = 9922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9931;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9937;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9939) END FROM WidgetInst WHERE WidgetInstId = 9939) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9940;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9939) END FROM WidgetInst WHERE WidgetInstId = 9939) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9943;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9948) END FROM WidgetInst WHERE WidgetInstId = 9948) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9948) END FROM WidgetInst WHERE WidgetInstId = 9948) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9948) END FROM WidgetInst WHERE WidgetInstId = 9948) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9955;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 9960) END FROM WidgetInst WHERE WidgetInstId = 9960)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9962) END FROM WidgetInst WHERE WidgetInstId = 9962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9962) END FROM WidgetInst WHERE WidgetInstId = 9962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9967;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9962) END FROM WidgetInst WHERE WidgetInstId = 9962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9970;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9962) END FROM WidgetInst WHERE WidgetInstId = 9962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9971;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9960) END FROM WidgetInst WHERE WidgetInstId = 9960)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9962) END FROM WidgetInst WHERE WidgetInstId = 9962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9975;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9962) END FROM WidgetInst WHERE WidgetInstId = 9962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 9978) END FROM WidgetInst WHERE WidgetInstId = 9978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9979;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9962) END FROM WidgetInst WHERE WidgetInstId = 9962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9962) END FROM WidgetInst WHERE WidgetInstId = 9962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9982;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 9978) END FROM WidgetInst WHERE WidgetInstId = 9978) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9983;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 9962) END FROM WidgetInst WHERE WidgetInstId = 9962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9985;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 9962) END FROM WidgetInst WHERE WidgetInstId = 9962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9987;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 9990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10023) END FROM WidgetInst WHERE WidgetInstId = 10023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10024;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10023) END FROM WidgetInst WHERE WidgetInstId = 10023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10026;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10023) END FROM WidgetInst WHERE WidgetInstId = 10023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10028;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10039) END FROM WidgetInst WHERE WidgetInstId = 10039) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10040;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10039) END FROM WidgetInst WHERE WidgetInstId = 10039) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10042;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10039) END FROM WidgetInst WHERE WidgetInstId = 10039) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10044;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10059) END FROM WidgetInst WHERE WidgetInstId = 10059) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10059) END FROM WidgetInst WHERE WidgetInstId = 10059) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10059) END FROM WidgetInst WHERE WidgetInstId = 10059) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10079) END FROM WidgetInst WHERE WidgetInstId = 10079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10079) END FROM WidgetInst WHERE WidgetInstId = 10079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10079) END FROM WidgetInst WHERE WidgetInstId = 10079) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10085) END FROM WidgetInst WHERE WidgetInstId = 10085) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10079) END FROM WidgetInst WHERE WidgetInstId = 10079)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10086;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10085) END FROM WidgetInst WHERE WidgetInstId = 10085) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10079) END FROM WidgetInst WHERE WidgetInstId = 10079)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10088;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10085) END FROM WidgetInst WHERE WidgetInstId = 10085) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10079) END FROM WidgetInst WHERE WidgetInstId = 10079)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10090;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10094) END FROM WidgetInst WHERE WidgetInstId = 10094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10095;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10094) END FROM WidgetInst WHERE WidgetInstId = 10094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10098;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10094) END FROM WidgetInst WHERE WidgetInstId = 10094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10101;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10094) END FROM WidgetInst WHERE WidgetInstId = 10094) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10118) END FROM WidgetInst WHERE WidgetInstId = 10118) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10118) END FROM WidgetInst WHERE WidgetInstId = 10118) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10122;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10118) END FROM WidgetInst WHERE WidgetInstId = 10118) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10125;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10118) END FROM WidgetInst WHERE WidgetInstId = 10118) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10136;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 10140) END FROM WidgetInst WHERE WidgetInstId = 10140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10140) END FROM WidgetInst WHERE WidgetInstId = 10140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10143;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10140) END FROM WidgetInst WHERE WidgetInstId = 10140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10140) END FROM WidgetInst WHERE WidgetInstId = 10140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10140) END FROM WidgetInst WHERE WidgetInstId = 10140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10140) END FROM WidgetInst WHERE WidgetInstId = 10140) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 9919) END FROM WidgetInst WHERE WidgetInstId = 9919) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8572) END FROM WidgetInst WHERE WidgetInstId = 8572)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 10155) END FROM WidgetInst WHERE WidgetInstId = 10155) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 10186) END FROM WidgetInst WHERE WidgetInstId = 10186) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 10186) END FROM WidgetInst WHERE WidgetInstId = 10186) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10189;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 10199) END FROM WidgetInst WHERE WidgetInstId = 10199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 10201) END FROM WidgetInst WHERE WidgetInstId = 10201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10209;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 10199) END FROM WidgetInst WHERE WidgetInstId = 10199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10211;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 10201) END FROM WidgetInst WHERE WidgetInstId = 10201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10199) END FROM WidgetInst WHERE WidgetInstId = 10199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10201) END FROM WidgetInst WHERE WidgetInstId = 10201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10199) END FROM WidgetInst WHERE WidgetInstId = 10199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10201) END FROM WidgetInst WHERE WidgetInstId = 10201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10227;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10199) END FROM WidgetInst WHERE WidgetInstId = 10199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 10201) END FROM WidgetInst WHERE WidgetInstId = 10201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10231;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10233;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 10199) END FROM WidgetInst WHERE WidgetInstId = 10199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 10201) END FROM WidgetInst WHERE WidgetInstId = 10201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 10199) END FROM WidgetInst WHERE WidgetInstId = 10199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 10201) END FROM WidgetInst WHERE WidgetInstId = 10201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10257;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 10194) END FROM WidgetInst WHERE WidgetInstId = 10194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 10278) END FROM WidgetInst WHERE WidgetInstId = 10278) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10288) END FROM WidgetInst WHERE WidgetInstId = 10288) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10289;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 10291) END FROM WidgetInst WHERE WidgetInstId = 10291) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 10296) END FROM WidgetInst WHERE WidgetInstId = 10296) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 10296) END FROM WidgetInst WHERE WidgetInstId = 10296) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10299;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10288) END FROM WidgetInst WHERE WidgetInstId = 10288) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10314;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 10328;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 10328;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 10328;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 10328;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 10328;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 10328;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10331) END FROM WidgetInst WHERE WidgetInstId = 10331) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10332;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10340;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10348) END FROM WidgetInst WHERE WidgetInstId = 10348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10348) END FROM WidgetInst WHERE WidgetInstId = 10348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10352;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10355;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10357) END FROM WidgetInst WHERE WidgetInstId = 10357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10358;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10357) END FROM WidgetInst WHERE WidgetInstId = 10357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10357) END FROM WidgetInst WHERE WidgetInstId = 10357) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10364;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10367;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10369) END FROM WidgetInst WHERE WidgetInstId = 10369)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10371) END FROM WidgetInst WHERE WidgetInstId = 10371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10371) END FROM WidgetInst WHERE WidgetInstId = 10371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10371) END FROM WidgetInst WHERE WidgetInstId = 10371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10371) END FROM WidgetInst WHERE WidgetInstId = 10371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10369) END FROM WidgetInst WHERE WidgetInstId = 10369)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10371) END FROM WidgetInst WHERE WidgetInstId = 10371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10371) END FROM WidgetInst WHERE WidgetInstId = 10371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10387) END FROM WidgetInst WHERE WidgetInstId = 10387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10371) END FROM WidgetInst WHERE WidgetInstId = 10371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10371) END FROM WidgetInst WHERE WidgetInstId = 10371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10387) END FROM WidgetInst WHERE WidgetInstId = 10387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10371) END FROM WidgetInst WHERE WidgetInstId = 10371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10371) END FROM WidgetInst WHERE WidgetInstId = 10371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10432) END FROM WidgetInst WHERE WidgetInstId = 10432) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10432) END FROM WidgetInst WHERE WidgetInstId = 10432) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10432) END FROM WidgetInst WHERE WidgetInstId = 10432) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10448) END FROM WidgetInst WHERE WidgetInstId = 10448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10448) END FROM WidgetInst WHERE WidgetInstId = 10448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10448) END FROM WidgetInst WHERE WidgetInstId = 10448) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10468) END FROM WidgetInst WHERE WidgetInstId = 10468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10469;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10468) END FROM WidgetInst WHERE WidgetInstId = 10468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10468) END FROM WidgetInst WHERE WidgetInstId = 10468) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10488) END FROM WidgetInst WHERE WidgetInstId = 10488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10488) END FROM WidgetInst WHERE WidgetInstId = 10488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10491;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10488) END FROM WidgetInst WHERE WidgetInstId = 10488) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10493;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10494) END FROM WidgetInst WHERE WidgetInstId = 10494) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10488) END FROM WidgetInst WHERE WidgetInstId = 10488)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10494) END FROM WidgetInst WHERE WidgetInstId = 10494) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10488) END FROM WidgetInst WHERE WidgetInstId = 10488)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10497;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10494) END FROM WidgetInst WHERE WidgetInstId = 10494) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 10488) END FROM WidgetInst WHERE WidgetInstId = 10488)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10499;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10501;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10503) END FROM WidgetInst WHERE WidgetInstId = 10503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10503) END FROM WidgetInst WHERE WidgetInstId = 10503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10507;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10503) END FROM WidgetInst WHERE WidgetInstId = 10503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10503) END FROM WidgetInst WHERE WidgetInstId = 10503) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10328) END FROM WidgetInst WHERE WidgetInstId = 10328) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10527) END FROM WidgetInst WHERE WidgetInstId = 10527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10528;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10527) END FROM WidgetInst WHERE WidgetInstId = 10527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10527) END FROM WidgetInst WHERE WidgetInstId = 10527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 10527) END FROM WidgetInst WHERE WidgetInstId = 10527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 10549) END FROM WidgetInst WHERE WidgetInstId = 10549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10549) END FROM WidgetInst WHERE WidgetInstId = 10549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10549) END FROM WidgetInst WHERE WidgetInstId = 10549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10549) END FROM WidgetInst WHERE WidgetInstId = 10549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10549) END FROM WidgetInst WHERE WidgetInstId = 10549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 10549) END FROM WidgetInst WHERE WidgetInstId = 10549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8572) END FROM WidgetInst WHERE WidgetInstId = 8572)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 10564) END FROM WidgetInst WHERE WidgetInstId = 10564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10565;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 10575;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 10575;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 10575;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 10575;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 10575;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 10575;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 10576;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 10576;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 10576;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 10576;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 10576;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 10576;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 10577;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 10577;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 10577;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 10577;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 10577;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 10577;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 10578;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 10578;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 10578;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 10578;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 10578;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 10578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10587) END FROM WidgetInst WHERE WidgetInstId = 10587) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10588) END FROM WidgetInst WHERE WidgetInstId = 10588) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10589) END FROM WidgetInst WHERE WidgetInstId = 10589) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 10590) END FROM WidgetInst WHERE WidgetInstId = 10590) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10599;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10600;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 10183) END FROM WidgetInst WHERE WidgetInstId = 10183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10623;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 10183) END FROM WidgetInst WHERE WidgetInstId = 10183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10624;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 10183) END FROM WidgetInst WHERE WidgetInstId = 10183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 10183) END FROM WidgetInst WHERE WidgetInstId = 10183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 10183) END FROM WidgetInst WHERE WidgetInstId = 10183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 10183) END FROM WidgetInst WHERE WidgetInstId = 10183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10636;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 10183) END FROM WidgetInst WHERE WidgetInstId = 10183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 10183) END FROM WidgetInst WHERE WidgetInstId = 10183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10647;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10650;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10655) END FROM WidgetInst WHERE WidgetInstId = 10655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10656) END FROM WidgetInst WHERE WidgetInstId = 10656) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10657) END FROM WidgetInst WHERE WidgetInstId = 10657) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10658) END FROM WidgetInst WHERE WidgetInstId = 10658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10662;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10655) END FROM WidgetInst WHERE WidgetInstId = 10655) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10671;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10656) END FROM WidgetInst WHERE WidgetInstId = 10656) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10672;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10657) END FROM WidgetInst WHERE WidgetInstId = 10657) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10658) END FROM WidgetInst WHERE WidgetInstId = 10658) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10674;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10684;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10685;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10686;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10691) END FROM WidgetInst WHERE WidgetInstId = 10691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10695;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10692) END FROM WidgetInst WHERE WidgetInstId = 10692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10696;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10693) END FROM WidgetInst WHERE WidgetInstId = 10693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10694) END FROM WidgetInst WHERE WidgetInstId = 10694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10691) END FROM WidgetInst WHERE WidgetInstId = 10691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10707;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10692) END FROM WidgetInst WHERE WidgetInstId = 10692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10708;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10693) END FROM WidgetInst WHERE WidgetInstId = 10693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10709;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10694) END FROM WidgetInst WHERE WidgetInstId = 10694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10710;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10691) END FROM WidgetInst WHERE WidgetInstId = 10691) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10719;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10692) END FROM WidgetInst WHERE WidgetInstId = 10692) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10693) END FROM WidgetInst WHERE WidgetInstId = 10693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10721;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10694) END FROM WidgetInst WHERE WidgetInstId = 10694) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10722;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10731;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10739) END FROM WidgetInst WHERE WidgetInstId = 10739)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10751;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10740) END FROM WidgetInst WHERE WidgetInstId = 10740)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10752;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10741) END FROM WidgetInst WHERE WidgetInstId = 10741)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 10742) END FROM WidgetInst WHERE WidgetInstId = 10742)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10747) END FROM WidgetInst WHERE WidgetInstId = 10747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10748) END FROM WidgetInst WHERE WidgetInstId = 10748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10749) END FROM WidgetInst WHERE WidgetInstId = 10749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10750) END FROM WidgetInst WHERE WidgetInstId = 10750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10747) END FROM WidgetInst WHERE WidgetInstId = 10747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10748) END FROM WidgetInst WHERE WidgetInstId = 10748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10749) END FROM WidgetInst WHERE WidgetInstId = 10749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10750) END FROM WidgetInst WHERE WidgetInstId = 10750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10747) END FROM WidgetInst WHERE WidgetInstId = 10747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10748) END FROM WidgetInst WHERE WidgetInstId = 10748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10749) END FROM WidgetInst WHERE WidgetInstId = 10749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10781;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10750) END FROM WidgetInst WHERE WidgetInstId = 10750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10782;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10747) END FROM WidgetInst WHERE WidgetInstId = 10747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10783;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10748) END FROM WidgetInst WHERE WidgetInstId = 10748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10784;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10749) END FROM WidgetInst WHERE WidgetInstId = 10749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10785;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10750) END FROM WidgetInst WHERE WidgetInstId = 10750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10786;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10739) END FROM WidgetInst WHERE WidgetInstId = 10739)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10787;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10740) END FROM WidgetInst WHERE WidgetInstId = 10740)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10741) END FROM WidgetInst WHERE WidgetInstId = 10741)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10742) END FROM WidgetInst WHERE WidgetInstId = 10742)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10747) END FROM WidgetInst WHERE WidgetInstId = 10747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10748) END FROM WidgetInst WHERE WidgetInstId = 10748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10800;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10749) END FROM WidgetInst WHERE WidgetInstId = 10749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10750) END FROM WidgetInst WHERE WidgetInstId = 10750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10802;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10747) END FROM WidgetInst WHERE WidgetInstId = 10747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10748) END FROM WidgetInst WHERE WidgetInstId = 10748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10804;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10749) END FROM WidgetInst WHERE WidgetInstId = 10749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10750) END FROM WidgetInst WHERE WidgetInstId = 10750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10811) END FROM WidgetInst WHERE WidgetInstId = 10811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10815;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10812) END FROM WidgetInst WHERE WidgetInstId = 10812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10813) END FROM WidgetInst WHERE WidgetInstId = 10813) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 10814) END FROM WidgetInst WHERE WidgetInstId = 10814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10818;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10747) END FROM WidgetInst WHERE WidgetInstId = 10747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10748) END FROM WidgetInst WHERE WidgetInstId = 10748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10749) END FROM WidgetInst WHERE WidgetInstId = 10749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10750) END FROM WidgetInst WHERE WidgetInstId = 10750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10747) END FROM WidgetInst WHERE WidgetInstId = 10747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10748) END FROM WidgetInst WHERE WidgetInstId = 10748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10828;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10749) END FROM WidgetInst WHERE WidgetInstId = 10749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10750) END FROM WidgetInst WHERE WidgetInstId = 10750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10811) END FROM WidgetInst WHERE WidgetInstId = 10811) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10812) END FROM WidgetInst WHERE WidgetInstId = 10812) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10813) END FROM WidgetInst WHERE WidgetInstId = 10813) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 10814) END FROM WidgetInst WHERE WidgetInstId = 10814) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10747) END FROM WidgetInst WHERE WidgetInstId = 10747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10748) END FROM WidgetInst WHERE WidgetInstId = 10748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10749) END FROM WidgetInst WHERE WidgetInstId = 10749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 10750) END FROM WidgetInst WHERE WidgetInstId = 10750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10842;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10747) END FROM WidgetInst WHERE WidgetInstId = 10747) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10748) END FROM WidgetInst WHERE WidgetInstId = 10748) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10844;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10749) END FROM WidgetInst WHERE WidgetInstId = 10749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10845;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 10750) END FROM WidgetInst WHERE WidgetInstId = 10750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10860;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10862;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10991) END FROM WidgetInst WHERE WidgetInstId = 10991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10992) END FROM WidgetInst WHERE WidgetInstId = 10992) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10996;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10993) END FROM WidgetInst WHERE WidgetInstId = 10993) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10997;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10994) END FROM WidgetInst WHERE WidgetInstId = 10994) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 10998;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10991) END FROM WidgetInst WHERE WidgetInstId = 10991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10992) END FROM WidgetInst WHERE WidgetInstId = 10992) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10993) END FROM WidgetInst WHERE WidgetInstId = 10993) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10994) END FROM WidgetInst WHERE WidgetInstId = 10994) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10991) END FROM WidgetInst WHERE WidgetInstId = 10991) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10992) END FROM WidgetInst WHERE WidgetInstId = 10992) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10993) END FROM WidgetInst WHERE WidgetInstId = 10993) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 10994) END FROM WidgetInst WHERE WidgetInstId = 10994) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11019;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11020;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11021;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11022;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11055) END FROM WidgetInst WHERE WidgetInstId = 11055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11056) END FROM WidgetInst WHERE WidgetInstId = 11056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11057) END FROM WidgetInst WHERE WidgetInstId = 11057) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11061;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11058) END FROM WidgetInst WHERE WidgetInstId = 11058) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11055) END FROM WidgetInst WHERE WidgetInstId = 11055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11056) END FROM WidgetInst WHERE WidgetInstId = 11056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11068;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11057) END FROM WidgetInst WHERE WidgetInstId = 11057) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11058) END FROM WidgetInst WHERE WidgetInstId = 11058) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11070;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11055) END FROM WidgetInst WHERE WidgetInstId = 11055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11056) END FROM WidgetInst WHERE WidgetInstId = 11056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11057) END FROM WidgetInst WHERE WidgetInstId = 11057) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11058) END FROM WidgetInst WHERE WidgetInstId = 11058) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11084;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11086;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11135) END FROM WidgetInst WHERE WidgetInstId = 11135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11136) END FROM WidgetInst WHERE WidgetInstId = 11136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11137) END FROM WidgetInst WHERE WidgetInstId = 11137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11138) END FROM WidgetInst WHERE WidgetInstId = 11138) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11142;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11135) END FROM WidgetInst WHERE WidgetInstId = 11135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11136) END FROM WidgetInst WHERE WidgetInstId = 11136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11137) END FROM WidgetInst WHERE WidgetInstId = 11137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11149;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11138) END FROM WidgetInst WHERE WidgetInstId = 11138) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11135) END FROM WidgetInst WHERE WidgetInstId = 11135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11136) END FROM WidgetInst WHERE WidgetInstId = 11136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11137) END FROM WidgetInst WHERE WidgetInstId = 11137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11138) END FROM WidgetInst WHERE WidgetInstId = 11138) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11215) END FROM WidgetInst WHERE WidgetInstId = 11215) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11219;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11216) END FROM WidgetInst WHERE WidgetInstId = 11216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11220;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11217) END FROM WidgetInst WHERE WidgetInstId = 11217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11218) END FROM WidgetInst WHERE WidgetInstId = 11218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11222;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11215) END FROM WidgetInst WHERE WidgetInstId = 11215) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11227;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11216) END FROM WidgetInst WHERE WidgetInstId = 11216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11228;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11217) END FROM WidgetInst WHERE WidgetInstId = 11217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11229;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11218) END FROM WidgetInst WHERE WidgetInstId = 11218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11230;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11215) END FROM WidgetInst WHERE WidgetInstId = 11215) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11216) END FROM WidgetInst WHERE WidgetInstId = 11216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11217) END FROM WidgetInst WHERE WidgetInstId = 11217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11218) END FROM WidgetInst WHERE WidgetInstId = 11218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11239) END FROM WidgetInst WHERE WidgetInstId = 11239) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11215) END FROM WidgetInst WHERE WidgetInstId = 11215)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11240) END FROM WidgetInst WHERE WidgetInstId = 11240) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11216) END FROM WidgetInst WHERE WidgetInstId = 11216)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11244;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11241) END FROM WidgetInst WHERE WidgetInstId = 11241) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11217) END FROM WidgetInst WHERE WidgetInstId = 11217)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11242) END FROM WidgetInst WHERE WidgetInstId = 11242) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11218) END FROM WidgetInst WHERE WidgetInstId = 11218)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11246;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11239) END FROM WidgetInst WHERE WidgetInstId = 11239) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11215) END FROM WidgetInst WHERE WidgetInstId = 11215)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11240) END FROM WidgetInst WHERE WidgetInstId = 11240) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11216) END FROM WidgetInst WHERE WidgetInstId = 11216)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11252;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11241) END FROM WidgetInst WHERE WidgetInstId = 11241) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11217) END FROM WidgetInst WHERE WidgetInstId = 11217)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11242) END FROM WidgetInst WHERE WidgetInstId = 11242) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11218) END FROM WidgetInst WHERE WidgetInstId = 11218)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11239) END FROM WidgetInst WHERE WidgetInstId = 11239) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11215) END FROM WidgetInst WHERE WidgetInstId = 11215)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11240) END FROM WidgetInst WHERE WidgetInstId = 11240) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11216) END FROM WidgetInst WHERE WidgetInstId = 11216)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11260;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11241) END FROM WidgetInst WHERE WidgetInstId = 11241) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11217) END FROM WidgetInst WHERE WidgetInstId = 11217)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11242) END FROM WidgetInst WHERE WidgetInstId = 11242) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11218) END FROM WidgetInst WHERE WidgetInstId = 11218)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11270;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11275) END FROM WidgetInst WHERE WidgetInstId = 11275) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11276) END FROM WidgetInst WHERE WidgetInstId = 11276) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11280;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11277) END FROM WidgetInst WHERE WidgetInstId = 11277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11278) END FROM WidgetInst WHERE WidgetInstId = 11278) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11275) END FROM WidgetInst WHERE WidgetInstId = 11275) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11276) END FROM WidgetInst WHERE WidgetInstId = 11276) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11277) END FROM WidgetInst WHERE WidgetInstId = 11277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11278) END FROM WidgetInst WHERE WidgetInstId = 11278) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11294;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11275) END FROM WidgetInst WHERE WidgetInstId = 11275) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11276) END FROM WidgetInst WHERE WidgetInstId = 11276) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11277) END FROM WidgetInst WHERE WidgetInstId = 11277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11305;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11278) END FROM WidgetInst WHERE WidgetInstId = 11278) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11306;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11275) END FROM WidgetInst WHERE WidgetInstId = 11275) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11276) END FROM WidgetInst WHERE WidgetInstId = 11276) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11277) END FROM WidgetInst WHERE WidgetInstId = 11277) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11349;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11278) END FROM WidgetInst WHERE WidgetInstId = 11278) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11350;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11371) END FROM WidgetInst WHERE WidgetInstId = 11371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11372) END FROM WidgetInst WHERE WidgetInstId = 11372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11373) END FROM WidgetInst WHERE WidgetInstId = 11373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11374) END FROM WidgetInst WHERE WidgetInstId = 11374) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11371) END FROM WidgetInst WHERE WidgetInstId = 11371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11372) END FROM WidgetInst WHERE WidgetInstId = 11372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11373) END FROM WidgetInst WHERE WidgetInstId = 11373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11389;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11374) END FROM WidgetInst WHERE WidgetInstId = 11374) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11371) END FROM WidgetInst WHERE WidgetInstId = 11371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11372) END FROM WidgetInst WHERE WidgetInstId = 11372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11373) END FROM WidgetInst WHERE WidgetInstId = 11373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11374) END FROM WidgetInst WHERE WidgetInstId = 11374) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11371) END FROM WidgetInst WHERE WidgetInstId = 11371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11443;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11372) END FROM WidgetInst WHERE WidgetInstId = 11372) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11373) END FROM WidgetInst WHERE WidgetInstId = 11373) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11374) END FROM WidgetInst WHERE WidgetInstId = 11374) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 11459) END FROM WidgetInst WHERE WidgetInstId = 11459) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 11460) END FROM WidgetInst WHERE WidgetInstId = 11460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 11461) END FROM WidgetInst WHERE WidgetInstId = 11461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11465;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 11462) END FROM WidgetInst WHERE WidgetInstId = 11462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11466;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11459) END FROM WidgetInst WHERE WidgetInstId = 11459) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11471;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11460) END FROM WidgetInst WHERE WidgetInstId = 11460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11472;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11461) END FROM WidgetInst WHERE WidgetInstId = 11461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11462) END FROM WidgetInst WHERE WidgetInstId = 11462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11459) END FROM WidgetInst WHERE WidgetInstId = 11459) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11479;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11460) END FROM WidgetInst WHERE WidgetInstId = 11460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11461) END FROM WidgetInst WHERE WidgetInstId = 11461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11462) END FROM WidgetInst WHERE WidgetInstId = 11462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11482;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11459) END FROM WidgetInst WHERE WidgetInstId = 11459) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11460) END FROM WidgetInst WHERE WidgetInstId = 11460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11461) END FROM WidgetInst WHERE WidgetInstId = 11461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11462) END FROM WidgetInst WHERE WidgetInstId = 11462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11459) END FROM WidgetInst WHERE WidgetInstId = 11459) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11495;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11460) END FROM WidgetInst WHERE WidgetInstId = 11460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11496;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11461) END FROM WidgetInst WHERE WidgetInstId = 11461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11497;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11462) END FROM WidgetInst WHERE WidgetInstId = 11462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11498;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11459) END FROM WidgetInst WHERE WidgetInstId = 11459) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11460) END FROM WidgetInst WHERE WidgetInstId = 11460) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11504;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11461) END FROM WidgetInst WHERE WidgetInstId = 11461) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11505;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11462) END FROM WidgetInst WHERE WidgetInstId = 11462) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11506;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10575) END FROM WidgetInst WHERE WidgetInstId = 10575) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 10186) END FROM WidgetInst WHERE WidgetInstId = 10186)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10576) END FROM WidgetInst WHERE WidgetInstId = 10576) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 10186) END FROM WidgetInst WHERE WidgetInstId = 10186)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10577) END FROM WidgetInst WHERE WidgetInstId = 10577) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 10186) END FROM WidgetInst WHERE WidgetInstId = 10186)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11513;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 10578) END FROM WidgetInst WHERE WidgetInstId = 10578) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 10186) END FROM WidgetInst WHERE WidgetInstId = 10186)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11514;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 11519) END FROM WidgetInst WHERE WidgetInstId = 11519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11523;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 11520) END FROM WidgetInst WHERE WidgetInstId = 11520) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11524;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 11521) END FROM WidgetInst WHERE WidgetInstId = 11521) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11525;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 11522) END FROM WidgetInst WHERE WidgetInstId = 11522) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11526;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 11533;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 11533;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 11533;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 11533;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 11533;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 11533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 11536) END FROM WidgetInst WHERE WidgetInstId = 11536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 10183) END FROM WidgetInst WHERE WidgetInstId = 10183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 10183) END FROM WidgetInst WHERE WidgetInstId = 10183) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11553) END FROM WidgetInst WHERE WidgetInstId = 11553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11553) END FROM WidgetInst WHERE WidgetInstId = 11553) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11562) END FROM WidgetInst WHERE WidgetInstId = 11562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11562) END FROM WidgetInst WHERE WidgetInstId = 11562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11562) END FROM WidgetInst WHERE WidgetInstId = 11562) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11574) END FROM WidgetInst WHERE WidgetInstId = 11574)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11576) END FROM WidgetInst WHERE WidgetInstId = 11576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11576) END FROM WidgetInst WHERE WidgetInstId = 11576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11576) END FROM WidgetInst WHERE WidgetInstId = 11576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11576) END FROM WidgetInst WHERE WidgetInstId = 11576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11574) END FROM WidgetInst WHERE WidgetInstId = 11574)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11576) END FROM WidgetInst WHERE WidgetInstId = 11576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11576) END FROM WidgetInst WHERE WidgetInstId = 11576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11592) END FROM WidgetInst WHERE WidgetInstId = 11592) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11576) END FROM WidgetInst WHERE WidgetInstId = 11576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11576) END FROM WidgetInst WHERE WidgetInstId = 11576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11596;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11592) END FROM WidgetInst WHERE WidgetInstId = 11592) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11576) END FROM WidgetInst WHERE WidgetInstId = 11576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11599;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11576) END FROM WidgetInst WHERE WidgetInstId = 11576) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11600;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11637) END FROM WidgetInst WHERE WidgetInstId = 11637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11637) END FROM WidgetInst WHERE WidgetInstId = 11637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11640;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11637) END FROM WidgetInst WHERE WidgetInstId = 11637) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11642;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11644;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11653) END FROM WidgetInst WHERE WidgetInstId = 11653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11654;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11653) END FROM WidgetInst WHERE WidgetInstId = 11653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11653) END FROM WidgetInst WHERE WidgetInstId = 11653) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11658;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11673) END FROM WidgetInst WHERE WidgetInstId = 11673) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11674;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11673) END FROM WidgetInst WHERE WidgetInstId = 11673) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11673) END FROM WidgetInst WHERE WidgetInstId = 11673) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11693) END FROM WidgetInst WHERE WidgetInstId = 11693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11694;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11693) END FROM WidgetInst WHERE WidgetInstId = 11693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11696;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11693) END FROM WidgetInst WHERE WidgetInstId = 11693) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11699) END FROM WidgetInst WHERE WidgetInstId = 11699) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11693) END FROM WidgetInst WHERE WidgetInstId = 11693)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11699) END FROM WidgetInst WHERE WidgetInstId = 11699) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11693) END FROM WidgetInst WHERE WidgetInstId = 11693)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11702;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 11699) END FROM WidgetInst WHERE WidgetInstId = 11699) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 11693) END FROM WidgetInst WHERE WidgetInstId = 11693)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11704;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11706;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11708) END FROM WidgetInst WHERE WidgetInstId = 11708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11709;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11708) END FROM WidgetInst WHERE WidgetInstId = 11708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11712;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11708) END FROM WidgetInst WHERE WidgetInstId = 11708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11708) END FROM WidgetInst WHERE WidgetInstId = 11708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11726;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11732) END FROM WidgetInst WHERE WidgetInstId = 11732) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11732) END FROM WidgetInst WHERE WidgetInstId = 11732) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11736;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11732) END FROM WidgetInst WHERE WidgetInstId = 11732) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11739;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 11732) END FROM WidgetInst WHERE WidgetInstId = 11732) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11750;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 11754) END FROM WidgetInst WHERE WidgetInstId = 11754) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11754) END FROM WidgetInst WHERE WidgetInstId = 11754) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11757;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11754) END FROM WidgetInst WHERE WidgetInstId = 11754) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11754) END FROM WidgetInst WHERE WidgetInstId = 11754) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11754) END FROM WidgetInst WHERE WidgetInstId = 11754) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 11754) END FROM WidgetInst WHERE WidgetInstId = 11754) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 11533) END FROM WidgetInst WHERE WidgetInstId = 11533) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 10186) END FROM WidgetInst WHERE WidgetInstId = 10186)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 11769) END FROM WidgetInst WHERE WidgetInstId = 11769) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 11800) END FROM WidgetInst WHERE WidgetInstId = 11800) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 11800) END FROM WidgetInst WHERE WidgetInstId = 11800) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 11813) END FROM WidgetInst WHERE WidgetInstId = 11813) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 11815) END FROM WidgetInst WHERE WidgetInstId = 11815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 11813) END FROM WidgetInst WHERE WidgetInstId = 11813) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 11815) END FROM WidgetInst WHERE WidgetInstId = 11815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 11813) END FROM WidgetInst WHERE WidgetInstId = 11813) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 11815) END FROM WidgetInst WHERE WidgetInstId = 11815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 11813) END FROM WidgetInst WHERE WidgetInstId = 11813) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 11815) END FROM WidgetInst WHERE WidgetInstId = 11815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 11813) END FROM WidgetInst WHERE WidgetInstId = 11813) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 11815) END FROM WidgetInst WHERE WidgetInstId = 11815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11845;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 11813) END FROM WidgetInst WHERE WidgetInstId = 11813) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 11815) END FROM WidgetInst WHERE WidgetInstId = 11815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11853;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 11813) END FROM WidgetInst WHERE WidgetInstId = 11813) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 11815) END FROM WidgetInst WHERE WidgetInstId = 11815) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11861;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11863;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 11808) END FROM WidgetInst WHERE WidgetInstId = 11808) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 11892) END FROM WidgetInst WHERE WidgetInstId = 11892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 11902) END FROM WidgetInst WHERE WidgetInstId = 11902) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11903;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 11905) END FROM WidgetInst WHERE WidgetInstId = 11905) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 11910) END FROM WidgetInst WHERE WidgetInstId = 11910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11911;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 11910) END FROM WidgetInst WHERE WidgetInstId = 11910) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11913;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 11902) END FROM WidgetInst WHERE WidgetInstId = 11902) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11928;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 11942;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 11942;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 11942;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 11942;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 11942;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 11942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11943;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 11945) END FROM WidgetInst WHERE WidgetInstId = 11945) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 8569) END FROM WidgetInst WHERE WidgetInstId = 8569) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11957;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11962) END FROM WidgetInst WHERE WidgetInstId = 11962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11962) END FROM WidgetInst WHERE WidgetInstId = 11962) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11966;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11969;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11971) END FROM WidgetInst WHERE WidgetInstId = 11971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11971) END FROM WidgetInst WHERE WidgetInstId = 11971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11975;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 11971) END FROM WidgetInst WHERE WidgetInstId = 11971) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11978;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11981;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 11983) END FROM WidgetInst WHERE WidgetInstId = 11983)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11985) END FROM WidgetInst WHERE WidgetInstId = 11985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11985) END FROM WidgetInst WHERE WidgetInstId = 11985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11985) END FROM WidgetInst WHERE WidgetInstId = 11985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11993;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11985) END FROM WidgetInst WHERE WidgetInstId = 11985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 11983) END FROM WidgetInst WHERE WidgetInstId = 11983)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11985) END FROM WidgetInst WHERE WidgetInstId = 11985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11998;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11985) END FROM WidgetInst WHERE WidgetInstId = 11985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 11999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12001) END FROM WidgetInst WHERE WidgetInstId = 12001) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11985) END FROM WidgetInst WHERE WidgetInstId = 11985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11985) END FROM WidgetInst WHERE WidgetInstId = 11985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12001) END FROM WidgetInst WHERE WidgetInstId = 12001) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12006;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 11985) END FROM WidgetInst WHERE WidgetInstId = 11985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12008;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 11985) END FROM WidgetInst WHERE WidgetInstId = 11985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12009;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12010;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12046) END FROM WidgetInst WHERE WidgetInstId = 12046) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12046) END FROM WidgetInst WHERE WidgetInstId = 12046) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12046) END FROM WidgetInst WHERE WidgetInstId = 12046) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12062) END FROM WidgetInst WHERE WidgetInstId = 12062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12062) END FROM WidgetInst WHERE WidgetInstId = 12062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12062) END FROM WidgetInst WHERE WidgetInstId = 12062) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12082) END FROM WidgetInst WHERE WidgetInstId = 12082) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12082) END FROM WidgetInst WHERE WidgetInstId = 12082) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12082) END FROM WidgetInst WHERE WidgetInstId = 12082) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12087;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12102) END FROM WidgetInst WHERE WidgetInstId = 12102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12103;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12102) END FROM WidgetInst WHERE WidgetInstId = 12102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12105;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12102) END FROM WidgetInst WHERE WidgetInstId = 12102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12107;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12108) END FROM WidgetInst WHERE WidgetInstId = 12108) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12102) END FROM WidgetInst WHERE WidgetInstId = 12102)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12108) END FROM WidgetInst WHERE WidgetInstId = 12108) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12102) END FROM WidgetInst WHERE WidgetInstId = 12102)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12108) END FROM WidgetInst WHERE WidgetInstId = 12108) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12102) END FROM WidgetInst WHERE WidgetInstId = 12102)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12113;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12117) END FROM WidgetInst WHERE WidgetInstId = 12117) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12118;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12117) END FROM WidgetInst WHERE WidgetInstId = 12117) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12121;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12117) END FROM WidgetInst WHERE WidgetInstId = 12117) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12124;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12117) END FROM WidgetInst WHERE WidgetInstId = 12117) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 11942) END FROM WidgetInst WHERE WidgetInstId = 11942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12141) END FROM WidgetInst WHERE WidgetInstId = 12141) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12142;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12141) END FROM WidgetInst WHERE WidgetInstId = 12141) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12145;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12141) END FROM WidgetInst WHERE WidgetInstId = 12141) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12148;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12141) END FROM WidgetInst WHERE WidgetInstId = 12141) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 12163) END FROM WidgetInst WHERE WidgetInstId = 12163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12163) END FROM WidgetInst WHERE WidgetInstId = 12163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12163) END FROM WidgetInst WHERE WidgetInstId = 12163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12163) END FROM WidgetInst WHERE WidgetInstId = 12163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12163) END FROM WidgetInst WHERE WidgetInstId = 12163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12172;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 12163) END FROM WidgetInst WHERE WidgetInstId = 12163) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 8714) END FROM WidgetInst WHERE WidgetInstId = 8714) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 8572) END FROM WidgetInst WHERE WidgetInstId = 8572)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 12178) END FROM WidgetInst WHERE WidgetInstId = 12178) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12179;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 12189;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 12189;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 12189;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 12189;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 12189;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 12189;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 12190;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 12190;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 12190;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 12190;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 12190;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 12190;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 12191;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 12191;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 12191;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 12191;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 12191;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 12191;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 12192;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 12192;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 12192;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 12192;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 12192;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 12192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 12201) END FROM WidgetInst WHERE WidgetInstId = 12201) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 12202) END FROM WidgetInst WHERE WidgetInstId = 12202) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 12203) END FROM WidgetInst WHERE WidgetInstId = 12203) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 12204) END FROM WidgetInst WHERE WidgetInstId = 12204) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12208;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 11797) END FROM WidgetInst WHERE WidgetInstId = 11797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 11797) END FROM WidgetInst WHERE WidgetInstId = 11797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 11797) END FROM WidgetInst WHERE WidgetInstId = 11797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 11797) END FROM WidgetInst WHERE WidgetInstId = 11797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12240;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 11797) END FROM WidgetInst WHERE WidgetInstId = 11797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 11797) END FROM WidgetInst WHERE WidgetInstId = 11797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12250;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 11797) END FROM WidgetInst WHERE WidgetInstId = 11797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 11797) END FROM WidgetInst WHERE WidgetInstId = 11797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12252;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12262;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12264;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12269) END FROM WidgetInst WHERE WidgetInstId = 12269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12270) END FROM WidgetInst WHERE WidgetInstId = 12270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12274;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12271) END FROM WidgetInst WHERE WidgetInstId = 12271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12272) END FROM WidgetInst WHERE WidgetInstId = 12272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12276;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12269) END FROM WidgetInst WHERE WidgetInstId = 12269) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12285;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12270) END FROM WidgetInst WHERE WidgetInstId = 12270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12286;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12271) END FROM WidgetInst WHERE WidgetInstId = 12271) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12287;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12272) END FROM WidgetInst WHERE WidgetInstId = 12272) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12288;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12298;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12299;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12300;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12305) END FROM WidgetInst WHERE WidgetInstId = 12305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12309;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12306) END FROM WidgetInst WHERE WidgetInstId = 12306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12310;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12307) END FROM WidgetInst WHERE WidgetInstId = 12307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12308) END FROM WidgetInst WHERE WidgetInstId = 12308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12312;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12305) END FROM WidgetInst WHERE WidgetInstId = 12305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12306) END FROM WidgetInst WHERE WidgetInstId = 12306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12307) END FROM WidgetInst WHERE WidgetInstId = 12307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12308) END FROM WidgetInst WHERE WidgetInstId = 12308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12324;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12305) END FROM WidgetInst WHERE WidgetInstId = 12305) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12333;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12306) END FROM WidgetInst WHERE WidgetInstId = 12306) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12307) END FROM WidgetInst WHERE WidgetInstId = 12307) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12335;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12308) END FROM WidgetInst WHERE WidgetInstId = 12308) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12336;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12345;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12347;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12348;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12353) END FROM WidgetInst WHERE WidgetInstId = 12353)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12365;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12354) END FROM WidgetInst WHERE WidgetInstId = 12354)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12355) END FROM WidgetInst WHERE WidgetInstId = 12355)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12367;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12356) END FROM WidgetInst WHERE WidgetInstId = 12356)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12368;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12361) END FROM WidgetInst WHERE WidgetInstId = 12361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12377;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12362) END FROM WidgetInst WHERE WidgetInstId = 12362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12363) END FROM WidgetInst WHERE WidgetInstId = 12363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12379;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12364) END FROM WidgetInst WHERE WidgetInstId = 12364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12361) END FROM WidgetInst WHERE WidgetInstId = 12361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12381;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12362) END FROM WidgetInst WHERE WidgetInstId = 12362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12363) END FROM WidgetInst WHERE WidgetInstId = 12363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12364) END FROM WidgetInst WHERE WidgetInstId = 12364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12361) END FROM WidgetInst WHERE WidgetInstId = 12361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12362) END FROM WidgetInst WHERE WidgetInstId = 12362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12363) END FROM WidgetInst WHERE WidgetInstId = 12363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12364) END FROM WidgetInst WHERE WidgetInstId = 12364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12361) END FROM WidgetInst WHERE WidgetInstId = 12361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12362) END FROM WidgetInst WHERE WidgetInstId = 12362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12363) END FROM WidgetInst WHERE WidgetInstId = 12363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12364) END FROM WidgetInst WHERE WidgetInstId = 12364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12353) END FROM WidgetInst WHERE WidgetInstId = 12353)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12354) END FROM WidgetInst WHERE WidgetInstId = 12354)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12355) END FROM WidgetInst WHERE WidgetInstId = 12355)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12356) END FROM WidgetInst WHERE WidgetInstId = 12356)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12361) END FROM WidgetInst WHERE WidgetInstId = 12361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12362) END FROM WidgetInst WHERE WidgetInstId = 12362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12363) END FROM WidgetInst WHERE WidgetInstId = 12363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12364) END FROM WidgetInst WHERE WidgetInstId = 12364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12361) END FROM WidgetInst WHERE WidgetInstId = 12361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12362) END FROM WidgetInst WHERE WidgetInstId = 12362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12363) END FROM WidgetInst WHERE WidgetInstId = 12363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12364) END FROM WidgetInst WHERE WidgetInstId = 12364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12425) END FROM WidgetInst WHERE WidgetInstId = 12425) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12426) END FROM WidgetInst WHERE WidgetInstId = 12426) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12427) END FROM WidgetInst WHERE WidgetInstId = 12427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12428) END FROM WidgetInst WHERE WidgetInstId = 12428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12361) END FROM WidgetInst WHERE WidgetInstId = 12361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12362) END FROM WidgetInst WHERE WidgetInstId = 12362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12363) END FROM WidgetInst WHERE WidgetInstId = 12363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12364) END FROM WidgetInst WHERE WidgetInstId = 12364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12361) END FROM WidgetInst WHERE WidgetInstId = 12361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12362) END FROM WidgetInst WHERE WidgetInstId = 12362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12363) END FROM WidgetInst WHERE WidgetInstId = 12363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12443;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12364) END FROM WidgetInst WHERE WidgetInstId = 12364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12425) END FROM WidgetInst WHERE WidgetInstId = 12425) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12426) END FROM WidgetInst WHERE WidgetInstId = 12426) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12427) END FROM WidgetInst WHERE WidgetInstId = 12427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 12428) END FROM WidgetInst WHERE WidgetInstId = 12428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12361) END FROM WidgetInst WHERE WidgetInstId = 12361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12453;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12362) END FROM WidgetInst WHERE WidgetInstId = 12362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12454;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12363) END FROM WidgetInst WHERE WidgetInstId = 12363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12455;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 12364) END FROM WidgetInst WHERE WidgetInstId = 12364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12456;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12361) END FROM WidgetInst WHERE WidgetInstId = 12361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12457;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12362) END FROM WidgetInst WHERE WidgetInstId = 12362) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12458;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12363) END FROM WidgetInst WHERE WidgetInstId = 12363) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12459;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 12364) END FROM WidgetInst WHERE WidgetInstId = 12364) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12461;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12473;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12474;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12475;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12476;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12605) END FROM WidgetInst WHERE WidgetInstId = 12605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12609;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12606) END FROM WidgetInst WHERE WidgetInstId = 12606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12607) END FROM WidgetInst WHERE WidgetInstId = 12607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12608) END FROM WidgetInst WHERE WidgetInstId = 12608) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12612;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12605) END FROM WidgetInst WHERE WidgetInstId = 12605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12606) END FROM WidgetInst WHERE WidgetInstId = 12606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12607) END FROM WidgetInst WHERE WidgetInstId = 12607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12608) END FROM WidgetInst WHERE WidgetInstId = 12608) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12605) END FROM WidgetInst WHERE WidgetInstId = 12605) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12625;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12606) END FROM WidgetInst WHERE WidgetInstId = 12606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12626;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12607) END FROM WidgetInst WHERE WidgetInstId = 12607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12627;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12608) END FROM WidgetInst WHERE WidgetInstId = 12608) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12628;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12633;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12634;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12636;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12669) END FROM WidgetInst WHERE WidgetInstId = 12669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12673;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12670) END FROM WidgetInst WHERE WidgetInstId = 12670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12674;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12671) END FROM WidgetInst WHERE WidgetInstId = 12671) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12675;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12672) END FROM WidgetInst WHERE WidgetInstId = 12672) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12669) END FROM WidgetInst WHERE WidgetInstId = 12669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12670) END FROM WidgetInst WHERE WidgetInstId = 12670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12671) END FROM WidgetInst WHERE WidgetInstId = 12671) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12672) END FROM WidgetInst WHERE WidgetInstId = 12672) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12684;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12669) END FROM WidgetInst WHERE WidgetInstId = 12669) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12670) END FROM WidgetInst WHERE WidgetInstId = 12670) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12690;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12671) END FROM WidgetInst WHERE WidgetInstId = 12671) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12672) END FROM WidgetInst WHERE WidgetInstId = 12672) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12692;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12698;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12699;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12749) END FROM WidgetInst WHERE WidgetInstId = 12749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12753;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12750) END FROM WidgetInst WHERE WidgetInstId = 12750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12751) END FROM WidgetInst WHERE WidgetInstId = 12751) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12752) END FROM WidgetInst WHERE WidgetInstId = 12752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12756;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12749) END FROM WidgetInst WHERE WidgetInstId = 12749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12750) END FROM WidgetInst WHERE WidgetInstId = 12750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12751) END FROM WidgetInst WHERE WidgetInstId = 12751) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12752) END FROM WidgetInst WHERE WidgetInstId = 12752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12749) END FROM WidgetInst WHERE WidgetInstId = 12749) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12750) END FROM WidgetInst WHERE WidgetInstId = 12750) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12751) END FROM WidgetInst WHERE WidgetInstId = 12751) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12752) END FROM WidgetInst WHERE WidgetInstId = 12752) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12829) END FROM WidgetInst WHERE WidgetInstId = 12829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12830) END FROM WidgetInst WHERE WidgetInstId = 12830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12831) END FROM WidgetInst WHERE WidgetInstId = 12831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12832) END FROM WidgetInst WHERE WidgetInstId = 12832) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12836;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12829) END FROM WidgetInst WHERE WidgetInstId = 12829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12830) END FROM WidgetInst WHERE WidgetInstId = 12830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12842;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12831) END FROM WidgetInst WHERE WidgetInstId = 12831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12832) END FROM WidgetInst WHERE WidgetInstId = 12832) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12844;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12829) END FROM WidgetInst WHERE WidgetInstId = 12829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12830) END FROM WidgetInst WHERE WidgetInstId = 12830) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12831) END FROM WidgetInst WHERE WidgetInstId = 12831) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12832) END FROM WidgetInst WHERE WidgetInstId = 12832) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12853) END FROM WidgetInst WHERE WidgetInstId = 12853) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12829) END FROM WidgetInst WHERE WidgetInstId = 12829)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12854) END FROM WidgetInst WHERE WidgetInstId = 12854) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12830) END FROM WidgetInst WHERE WidgetInstId = 12830)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12858;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12855) END FROM WidgetInst WHERE WidgetInstId = 12855) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12831) END FROM WidgetInst WHERE WidgetInstId = 12831)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12859;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12856) END FROM WidgetInst WHERE WidgetInstId = 12856) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12832) END FROM WidgetInst WHERE WidgetInstId = 12832)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12860;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12853) END FROM WidgetInst WHERE WidgetInstId = 12853) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12829) END FROM WidgetInst WHERE WidgetInstId = 12829)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12854) END FROM WidgetInst WHERE WidgetInstId = 12854) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12830) END FROM WidgetInst WHERE WidgetInstId = 12830)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12855) END FROM WidgetInst WHERE WidgetInstId = 12855) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12831) END FROM WidgetInst WHERE WidgetInstId = 12831)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12856) END FROM WidgetInst WHERE WidgetInstId = 12856) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12832) END FROM WidgetInst WHERE WidgetInstId = 12832)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12853) END FROM WidgetInst WHERE WidgetInstId = 12853) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12829) END FROM WidgetInst WHERE WidgetInstId = 12829)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12854) END FROM WidgetInst WHERE WidgetInstId = 12854) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12830) END FROM WidgetInst WHERE WidgetInstId = 12830)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12855) END FROM WidgetInst WHERE WidgetInstId = 12855) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12831) END FROM WidgetInst WHERE WidgetInstId = 12831)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 12856) END FROM WidgetInst WHERE WidgetInstId = 12856) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 12832) END FROM WidgetInst WHERE WidgetInstId = 12832)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12876;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12883;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12889) END FROM WidgetInst WHERE WidgetInstId = 12889) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12893;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12890) END FROM WidgetInst WHERE WidgetInstId = 12890) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12894;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12891) END FROM WidgetInst WHERE WidgetInstId = 12891) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12895;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12892) END FROM WidgetInst WHERE WidgetInstId = 12892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12896;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12889) END FROM WidgetInst WHERE WidgetInstId = 12889) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12905;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12890) END FROM WidgetInst WHERE WidgetInstId = 12890) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12891) END FROM WidgetInst WHERE WidgetInstId = 12891) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12907;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12892) END FROM WidgetInst WHERE WidgetInstId = 12892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12908;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12889) END FROM WidgetInst WHERE WidgetInstId = 12889) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12917;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12890) END FROM WidgetInst WHERE WidgetInstId = 12890) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12918;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12891) END FROM WidgetInst WHERE WidgetInstId = 12891) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12919;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12892) END FROM WidgetInst WHERE WidgetInstId = 12892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12920;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12889) END FROM WidgetInst WHERE WidgetInstId = 12889) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12961;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12890) END FROM WidgetInst WHERE WidgetInstId = 12890) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12962;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12891) END FROM WidgetInst WHERE WidgetInstId = 12891) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12892) END FROM WidgetInst WHERE WidgetInstId = 12892) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12964;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 12189) END FROM WidgetInst WHERE WidgetInstId = 12189) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12973;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 12190) END FROM WidgetInst WHERE WidgetInstId = 12190) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 12191) END FROM WidgetInst WHERE WidgetInstId = 12191) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12975;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 12192) END FROM WidgetInst WHERE WidgetInstId = 12192) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12985) END FROM WidgetInst WHERE WidgetInstId = 12985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12986) END FROM WidgetInst WHERE WidgetInstId = 12986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12987) END FROM WidgetInst WHERE WidgetInstId = 12987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 12988) END FROM WidgetInst WHERE WidgetInstId = 12988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 12992;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12985) END FROM WidgetInst WHERE WidgetInstId = 12985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12986) END FROM WidgetInst WHERE WidgetInstId = 12986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12987) END FROM WidgetInst WHERE WidgetInstId = 12987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 12988) END FROM WidgetInst WHERE WidgetInstId = 12988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12985) END FROM WidgetInst WHERE WidgetInstId = 12985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12986) END FROM WidgetInst WHERE WidgetInstId = 12986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12987) END FROM WidgetInst WHERE WidgetInstId = 12987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 12988) END FROM WidgetInst WHERE WidgetInstId = 12988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13016;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12985) END FROM WidgetInst WHERE WidgetInstId = 12985) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12986) END FROM WidgetInst WHERE WidgetInstId = 12986) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12987) END FROM WidgetInst WHERE WidgetInstId = 12987) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 12988) END FROM WidgetInst WHERE WidgetInstId = 12988) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 13073) END FROM WidgetInst WHERE WidgetInstId = 13073) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 13074) END FROM WidgetInst WHERE WidgetInstId = 13074) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 13075) END FROM WidgetInst WHERE WidgetInstId = 13075) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 13079;


